//
//  Photo.swift
//  Photos
//
//  Created by wangqi on 2021/10/20.
//

import Foundation
class Photo: CommonObject {
    var title = ""
    var url = ""
    var thumbnailUrl = ""
}
extension Photo {
    static func setupWithListDatas(_ datas:[[String: Any]]?) -> [Photo] {
        var result = [Photo]()
        guard let values = [Photo].deserialize(from: datas) else { return result }
        let newResult = values.compactMap { item in
            return item
        }
        result.append(contentsOf: newResult)
        return result
    }
}
